#pragma once
#include "afxcmn.h"
#include "ChatClient.h"
#include "afxwin.h"	 



// CManagerForm form view

class CManagerForm : public CFormView
{
	DECLARE_DYNCREATE(CManagerForm)

protected:
	CManagerForm();           // protected constructor used by dynamic creation
	virtual ~CManagerForm();

public:
	enum { IDD = IDD_FORM_MANAGER };

#ifdef _DEBUG
	virtual void AssertValid() const;
#ifndef _WIN32_WCE
	virtual void Dump(CDumpContext& dc) const;
#endif
#endif

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	CTreeCtrl  m_maps;
	
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);

	static 		CManagerForm* Instance();
	static 	CManagerForm* s_form;
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
protected:
	afx_msg LRESULT OnMapsUsers(WPARAM wParam, LPARAM lParam);
public:
	afx_msg void OnNMClickMaps(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnNMDblclkMaps(NMHDR *pNMHDR, LRESULT *pResult);
protected:
	afx_msg LRESULT OnGetUserInfo(WPARAM wParam, LPARAM lParam);
public:
	CStatic m_Socket_Id;
	CStatic m_League_Id;
	CStatic m_Lock;
	CStatic m_Scene_Id;
	CStatic m_Uname;
	CStatic m_Key;
	CButton m_Add_Black_List;
	CButton m_Remove_Black_List;
	afx_msg void OnBnClickedAddblackList();
protected:
	afx_msg LRESULT OnAddBlackListOk(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnRemoveBlackListOk(WPARAM wParam, LPARAM lParam);
	int GetUser(char *user_ansi);
	int CManagerForm::GetIp(char *ip);
public:
	afx_msg void OnBnClickedRemoveBlackList();
	CButton m_Kick;
	afx_msg void OnClickedButtonKick();
protected:
	afx_msg LRESULT OnKickUserOk(WPARAM wParam, LPARAM lParam);
public:
	CButton m_reject_ip;
	CButton m_unreject_ip;
	afx_msg void OnBnClickedReject();
	afx_msg void OnBnClickedUnreject();
	afx_msg void OnBnClickedReload();
	CStatic m_ip;
protected:
	afx_msg LRESULT OnAddRejectOk(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnUnRejectOk(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT Other(WPARAM wParam, LPARAM lParam);
public:
	CRichEditCtrl m_Msg;
	afx_msg void OnServerShutdown();

	afx_msg void OnServerStart();
	afx_msg void OnServerIp();
	afx_msg void OnStnClickedUname();
	afx_msg void OnBnClickedButton3();
	CStatic mRid;
	afx_msg void OnBnClickedBroadCast();
};


